<template>
  <div>
    <h3 class="task-title">资源调度分析</h3>
    <div class="centertask-num">
      <div class="ck-num">
        <p class="ck-titlt">日均起降次数</p>
        <div
          class="lefttask-text"
          :span="8"
          v-for="(item, index) in taskList"
          :key="index"
        >
          <div class="ck-con">
            <p>{{ item.name }}</p>
            <p class="ck-con-tit">{{ item.title }}</p>
          </div>
          <div class="ck-progress">
            <el-progress
              style="width: 100%"
              :stroke-width="50"
              :percentage="50"
            ></el-progress>
          </div>
        </div>
      </div>
      <div class="ck-battery">
        <p class="ck-titlt">日均电池消耗</p>
        <div
          class="lefttask-text"
          :span="8"
          v-for="(item, index) in taskList"
          :key="index"
        >
          <div class="ck-con">
            <p>{{ item.name }}</p>
            <p class="ck-con-tit">{{ item.title }}</p>
          </div>
          <div class="ck-progress">
            <ElProgress
              style="width: 100%"
              :stroke-width="50"
              :percentage="50"
            />
          </div>
        </div>
      </div>
    </div>
  </div>
</template>
<script lang="ts" setup>
import { ElProgress } from 'element-plus';
import { ref, onMounted, onBeforeUnmount } from 'vue';
const taskList = ref([
  {
    name: '大理路机场',
    title: '12',
    progress: '30',
  },
  {
    name: '大理路机场',
    title: '12',
    progress: '30',
  },
  {
    name: '新华道机场',
    title: '12',
    progress: '30',
  },
  {
    name: '开发区机场',
    title: '12',
    progress: '30',
  },
  {
    name: '唐山站机场',
    title: '12',
    progress: '30',
  },
]);
</script>

<style lang="scss" scoped>
.task-title {
  margin: 25px 0 20px 47px;
  font-size: 23px;
  font-style: italic;
  color: #fff;
}

.centertask-num {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 20px 30px;

  .ck-num {
    flex: 1;
  }

  .ck-battery {
    flex: 1;
  }

  .ck-con {
    display: flex;
    margin-left: 60px;

    p {
      height: 30px;
      line-height: 30px;
    }
  }
}

.ck-progress {
  width: calc(90% - 60px);
  height: 8px;
  margin-left: 60px;
  background: #fff;
}

.ck-titlt {
  margin-bottom: 5px;
  text-align: center;
}
</style>
